package com.hfengxiang.example.canvasrotatedemo;

import android.graphics.Rect;

public class AnimateUtils {
    public static Rect getCurrentRect(Rect source,Rect target,float progress){
        Rect rect = new Rect();
        int l = (int) (source.left + (target.left - source.left) * progress);
        int t = (int) (source.top + (target.top - source.top) * progress);
        int r = (int) (source.right + (target.right - source.right) * progress);
        int b = (int) (source.bottom + (target.bottom - source.bottom) * progress);
        rect.set(l,t,r,b);
        return rect;
    }
}
